home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-06-05 | 4.3 KB | 240 lines |
- ' (c) 1990 Gary Shilvock
- '
- ' A Simple Drawing Program Designed To Keep Young Kids Amused
- '
- HELPSCREEN
- _START:
- Screen Open 0,320,256,16,Lowres
- Flash Off
- Cls 0
- Restore _COL
- For A=0 To 15
- Read CL
- Palette A,CL
- Next
- _COL:
- Data $0,$FFF,$F00,$F0,$F,$F0F,$FF,$555,$FAC,$357,$A0A,$419,$984,$238,$831,$438
- Colour 0,0
- Cls 0
- Change Mouse 2
- XLEN=8
- YLEN=8
- IN=1
- Do
- X=X Screen(X Mouse)
- Y=Y Screen(Y Mouse)
- If Mouse Key=1
- Ink IN
- If XLEN=0
- Plot X,Y
- End If
- If XLEN>0
- Bar X,Y To X+XLEN,Y+YLEN
- End If
- End If
- If Mouse Key=2
- Ink 0
- If XLEN=0
- Plot X,Y
- End If
- If XLEN>0
- Bar X,Y To X+XLEN,Y+YLEN
- End If
- End If
- K$=Inkey$
- If K$="="
- Bell
- If XLEN>31
- XLEN=31
- YLEN=31
- End If
- XLEN=XLEN+1
- YLEN=YLEN+1
- End If
- If K$="-"
- Bell
- XLEN=XLEN-1
- YLEN=YLEN-1
- If XLEN<0
- XLEN=0
- YLEN=0
- End If
- End If
- If K$="]"
- Bell
- IN=IN+1
- If IN=15
- IN=0
- End If
- End If
- If K$="["
- Bell
- IN=IN-1
- If IN=0
- IN=15
- End If
- End If
- If K$="1"
- Bell
- Set Pattern 1
- End If
- If K$="2"
- Bell
- Set Pattern 2
- End If
- If K$="3"
- Bell
- Set Pattern 3
- End If
- If K$="4"
- Bell
- Set Pattern 4
- End If
- If K$="5"
- Bell
- Set Pattern 5
- End If
- If K$="6"
- Bell
- Set Pattern 6
- End If
- If K$="7"
- Bell
- Set Pattern 7
- End If
- If K$="8"
- Bell
- Set Pattern 8
- End If
- If K$="9"
- Bell
- Set Pattern 9
- End If
- If K$="0"
- Bell
- Set Pattern 0
- End If
- If K$=" "
- Bell
- Cls 0
- End If
- If K$="."
- Bell
- XLEN=0
- YLEN=0
- End If
- If K$="s"
- Screen Open 1,640,30,2,Hires
- Screen To Front 1 : Screen 1
- Palette $0,$FFF
- Input "Enter Save Name: ";SAVNAM$
- If SAVNAM$=""
- SAVNAM$="Picture"
- End If
- Screen Close 1
- TMP$="Df0:"
- TMP$=TMP$+SAVNAM$
- THERE=Exist(TMP$)
- If THERE=0
- Save Iff TMP$,0
- Bell
- End If
- If THERE=-1
- TMP$="Df0:"
- TMP$=TMP$+SAVNAM$
- Kill TMP$
- Save Iff TMP$,0
- Bell
- End If
- End If
- If K$="l"
- NAME$=Fsel$("Df0:","","Choose Picture To Load.","")
- If NAME$=""
- Goto CONTINUE
- End If
- Load Iff NAME$,0
- End If
- CONTINUE:
- If K$="h"
- HELPSCREEN
- End If
- If K$="t"
- Screen Open 1,640,8,2,Hires : Palette $357,$FFF : Cls 0 : Hide
- Input "Enter Text: ";TXT$
- Screen Close 1
- Ink IN,0,0
- Text X,Y,TXT$
- Show
- End If
- If K$="f"
- Ink IN
- Paint X,Y,0
- End If
- If K$="i"
- Screen Open 1,640,8,2,Hires : Palette $35,$FFF
- Cls 0
- TMP$="Ink: "
- TMP$=TMP$+Str$(IN)
- TMP$=TMP$+" Brush Size: "
- TMP$=TMP$+Str$(XLEN)
- TMP$=TMP$+" x "
- TMP$=TMP$+Str$(YLEN)
- Text 0,6,TMP$
- Screen Display 1,132,0,,
- For DN=30 To 45
- Screen Display 1,132,DN,,
- Wait Vbl
- Next
- Wait 100
- For DN=45 To 30 Step -1
- Screen Display 1,132,DN,,
- Wait Vbl
- Next
- Screen Close 1
- End If
- If K$=""
- End If
- If K$=""
- End If
- Loop
- Procedure HELPSCREEN
- Screen Open 1,640,256,2,Hires
- Palette $35,$FFF : Cls 0
- Hide : Curs Off
- For A=0 To 26
- Locate 0,A
- Read TMP$
- Centre TMP$
- Next
- Wait Key
- Fade 1 : Wait 15
- Screen Close 1
- Data "Sketch Pad Help Screen"
- Data "----------------------"
- Data " "
- Data "Coded By Gary Shilvock (c) 1990"
- Data " "
- Data " "
- Data "Keys"
- Data "----"
- Data " "
- Data "+ Increase Brush Size - Decrease Brush Size "
- Data "[ Previous Colour ] Next Colour "
- Data "L Load Iff Screen S Save Iff Screen "
- Data "T Place Text At Cursor Pos F Fill "
- Data "I Info Screen Space Clear Screen "
- Data " "
- Data " "
- Data "Keys 1 To 0 For Different Brush Patterns."
- Data " "
- Data " "
- Data " "
- Data " "
- Data " "
- Data " "
- Data " "
- Data " "
- Data " "
- Data "Press Any Key To Return To Sketch Pad."
- Show
- End Proc